/**
  *****************************************************************************
  * @file    GPIO/GPIO_Toggle/main.c 
  * @author  MCU SD
  * @version V2.0.0
  * @date    15-Jan-2016
  * @brief   Main program body.
  *****************************************************************************
  */ 

/* Includes ------------------------------------------------------------------*/ 
#include "gd32f1x0.h"
#include "systick.h"
#include "GPIO_Config.h"
#include "spi_TLE5012B.h"


/* Private define ------------------------------------------------------------*/

uint16_t Angle;
uint16_t Speed;

/* Private functions ---------------------------------------------------------*/

/**
  * @brief  Main program.
  * @param  None
  * @retval None
  */
	
int main(void)
{
    SysTick_Configuration();
		GPIO_Config();
		SPI5012B_Init();
	
    while(1)
    {
			LED_ON ;
			Angle = ReadAngle();
			Speed = ReadSpeed();
      Delay_1ms(5);
			LED_OFF ;
			Delay_1ms(700);
    }
}

/******************* (C) COPYRIGHT 2016 GIGADEVICE *****END OF FILE****/
